package com.ruantu.clothing.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.ruantu.clothing.dao.UserRoleDao;
import com.ruantu.clothing.entity.UserRole;

/**
 * UserRoleServiceImpl
 */
@Service
@Transactional
public class UserRoleServiceImpl implements com.ruantu.clothing.service.UserRoleService {
    @Autowired
    private UserRoleDao dao;

    @Override
    public int addUserRole(List<UserRole> ur) {

        return dao.addUserRole(ur);
    }

    @Override
    public int shanUserRole(int userid) {

        return dao.delUserRole(userid);
    }

    // 查出所有role id 用户回显用
    @Override
    public List<Integer> findAllRoleId(int userid) {

        return dao.findAllroleId(userid);
    }

}
